
  template<class T>
  OCSingleton<T>::OCSingleton(void)
  {
  }
  template<class T>
  OCSingleton<T>::~OCSingleton(void)
  {
  }

  template<class T>
  void OCSingleton<T>::Clear()
  {
    if (_instance)
    {
      delete _instance;
      _instance = NULL;
    }
  }


  template<class T>
  T* OCSingleton<T>::_instance = NULL;


  template<class T>
  T* OCSingleton<T>::Instance (bool blnNew) 
  {
    if (_instance == NULL && blnNew)
    {
      _instance = new T;
    }
    return _instance;
  }
